package com.assistant.util;

/**
 * FeignUtil
 *
 * @author yingjianhua
 */
public class FeignUtil {

    public static <T> T getDataIfSuccess(MessageBodyWrapper<T> wrapper) {
        if (wrapper.getSuccess()) {
            return wrapper.getData();
        } else {
            throw new RuntimeException("接口请求异常: " + wrapper.getMsg());
        }
    }
}
